<?php

namespace catchAdmin\ce\tables;

use catchAdmin\ce\tables\forms\Factory;
use catcher\CatchTable;
use catcher\library\table\Actions;
use catcher\library\table\HeaderItem;
use catcher\library\table\Search;

class Ceshi extends CatchTable
{
    public function table()
    {        return $this->getTable('ceshi')
        ->header([
            HeaderItem::label('')->type('selection'),
            HeaderItem::label('班级名称')->prop('name'),

            HeaderItem::label('操作')->width(250)->actions([
                Actions::update(),
                Actions::delete()
            ])
        ])
        ->withActions([
            Actions::create()
        ])
        ->withSearch([
            Search::label('名称')->text('name', '名称')
        ])
        ->withApiRoute('ceshi')
        ->selectionChange()
        ->render();


    }


    public function form()
    {
        return Factory::create('ceshi');

    }

}